package com.messe.base.models;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.HashSet;
import java.util.Set;

/**
 * 房型表
 * Room entity. @author MyEclipse Persistence Tools
 */

public class Room implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = -771457769996109871L;
	private String id;
	/**对应酒店**/
	private Organization hotel;
	private Organization organizer;
	/**编号**/
	private String roomNum;
	/**房间类型**/
	private Integer roomType;
	/**图片**/
	private String imageUrl;
	/**有无早餐类型**/
	private Integer dejeunerType;
	/**有无宽带类型**/
	private Integer wideBandType;
	/**有无服务类型**/
	private Integer serverType;
	/**最早入住日期**/
	private Timestamp startDate;
	/**最晚退房日期**/
	private Timestamp endDate;
	
	/**状态**/
	private Integer statusId;
	
	/**展会关联**/
	private Set<ExhibitionRoomRel> exhibitionRoomRels=new HashSet<ExhibitionRoomRel>(0);
	/**房型副表**/
	private Set<RoomAppendix> roomAppendixes = new HashSet<RoomAppendix>(0);
	/**展商关联**/
	private Set<ExhibitorRoomRel> exhibitorRoomRels=new HashSet<ExhibitorRoomRel>(0);
	// Constructors
	/** default constructor */
	public Room() {
	}

	/** minimal constructor */
	public Room(String id) {
		this.id = id;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
	
	public Organization getHotel() {
		return hotel;
	}

	public void setHotel(Organization hotel) {
		this.hotel = hotel;
	}

	public Organization getOrganizer() {
		return organizer;
	}

	public void setOrganizer(Organization organizer) {
		this.organizer = organizer;
	}

	public Set<ExhibitionRoomRel> getExhibitionRoomRels() {
		return exhibitionRoomRels;
	}

	public void setExhibitionRoomRels(Set<ExhibitionRoomRel> exhibitionRoomRels) {
		this.exhibitionRoomRels = exhibitionRoomRels;
	}

	public String getRoomNum() {
		return roomNum;
	}

	public void setRoomNum(String roomNum) {
		this.roomNum = roomNum;
	}

	public Integer getRoomType() {
		return roomType;
	}

	public void setRoomType(Integer roomType) {
		this.roomType = roomType;
	}


	public String getImageUrl() {
		return imageUrl;
	}

	public void setImageUrl(String imageUrl) {
		this.imageUrl = imageUrl;
	}

	public Integer getDejeunerType() {
		return dejeunerType;
	}

	public void setDejeunerType(Integer dejeunerType) {
		this.dejeunerType = dejeunerType;
	}

	public Integer getWideBandType() {
		return wideBandType;
	}

	public void setWideBandType(Integer wideBandType) {
		this.wideBandType = wideBandType;
	}

	public Integer getServerType() {
		return serverType;
	}

	public void setServerType(Integer serverType) {
		this.serverType = serverType;
	}

	public Timestamp getStartDate() {
		return startDate;
	}

	public void setStartDate(Timestamp startDate) {
		this.startDate = startDate;
	}

	public Timestamp getEndDate() {
		return endDate;
	}

	public void setEndDate(Timestamp endDate) {
		this.endDate = endDate;
	}

	public Set<RoomAppendix> getRoomAppendixes() {
		return roomAppendixes;
	}

	public void setRoomAppendixes(Set<RoomAppendix> roomAppendixes) {
		this.roomAppendixes = roomAppendixes;
	}

	public Set<ExhibitorRoomRel> getExhibitorRoomRels() {
		return exhibitorRoomRels;
	}

	public void setExhibitorRoomRels(Set<ExhibitorRoomRel> exhibitorRoomRels) {
		this.exhibitorRoomRels = exhibitorRoomRels;
	}

	public Integer getStatusId() {
		return statusId;
	}

	public void setStatusId(Integer statusId) {
		this.statusId = statusId;
	}
	
	SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
	public String getStartTime(){
		return (null != startDate) ? sdf.format(startDate) : "";
	}
	public String getEndTime(){
		return (null != endDate) ? sdf.format(endDate) : "";
	}

}